<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\ai\validate;

use think\Validate;

/**
 * 钻石充值选项验证器
 */
class ChargeSettingValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'price' => 'require',
        'gift' => 'require',
        'sort' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'price' => '价格必须填写',
        'gift' => '赠送金额必须填写',
        'sort' => '排序必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'price',
            'gift',
            'sort',
        ],
        'update' => [
            'price',
            'gift',
            'sort',
        ],
    ];

}
